package com.ktwlsoft.archivemanage.domain.business.repositoryService.businessInspectTem;

import java.util.List;

import com.alibaba.fastjson.JSONObject;
import com.ktwlsoft.archivemanage.domain.dao.entity.businessInspectTem.BusinessInspectTem;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ktwlsoft.archivemanage.domain.dao.repository.businessInspectTem.IBusinessInspectTemMapper;

/**
 * business_inspect_tem--业务检查模板业务层接口实现类
 *
 * @author zhuhe on 2019-11-06 15:56:31
 * @version 1.0
 */
@Service
public class BusinessInspectTemRepositoryService {

	private final IBusinessInspectTemMapper businessInspectTemMapper;

	public BusinessInspectTemRepositoryService(IBusinessInspectTemMapper businessInspectTemMapper) {
		this.businessInspectTemMapper = businessInspectTemMapper;
	}

	/**
 	 * 查询分页 on 2019-11-06 15:56:31
 	 * @param pn 第几页
     * @param pageSize 每页多少条
 	 * @param businessInspectTem businessInspectTem
 	 * @return PageInfo<BusinessInspectTem>
 	 */
	public PageInfo<BusinessInspectTem> findPage(int pn, int pageSize, BusinessInspectTem businessInspectTem) {
		PageHelper.startPage(pn,pageSize);
		PageInfo<BusinessInspectTem> pageInfo = new PageInfo<BusinessInspectTem>(businessInspectTemMapper.findList(businessInspectTem));
		return pageInfo;
	}

	/**
	 * 查询分页 on 2019-11-06 15:56:31
	 * @param pn 第几页
	 * @param pageSize 每页多少条
	 * @param jsonObject jsonObject
	 * @return PageInfo<BusinessInspectTem>
	 */
	public PageInfo<BusinessInspectTem> findJsonPage(int pn, int pageSize, JSONObject jsonObject) {
		PageHelper.startPage(pn,pageSize);
		PageInfo<BusinessInspectTem> pageInfo = new PageInfo<BusinessInspectTem>(businessInspectTemMapper.findJsonList(jsonObject));
		return pageInfo;
	}

    /**
	 * 查询集合 on 2019-11-06 15:56:31
	 * @param businessInspectTem businessInspectTem
	 * @return List<BusinessInspectTem>
	 */
	public List<BusinessInspectTem> findList(BusinessInspectTem businessInspectTem) {
		return businessInspectTemMapper.findList(businessInspectTem);
	}

    /**
	 * 根据ID查询信息 on 2019-11-06 15:56:31
	 * @param id	主键
	 * @return BusinessInspectTem
	 */
	public BusinessInspectTem getById(Long id){
		return businessInspectTemMapper.getById(id);
	}

   /**
	 * 新增 on 2019-11-06 15:56:31
	 * @param businessInspectTem businessInspectTem
	 * @return int
	 */
	public int insert(BusinessInspectTem businessInspectTem){
		return businessInspectTemMapper.insert(businessInspectTem);
	}

   /**
	 * 修改 on 2019-11-06 15:56:31
	 * @param businessInspectTem businessInspectTem
	 * @return int
	 */
	public int update(BusinessInspectTem businessInspectTem){
		return businessInspectTemMapper.update(businessInspectTem);
	}

   /**
	 * 根据id集合批量删除信息 on 2019-11-06 15:56:31
	 * @param businessGuidanceTemArr	主键编号集合
	 * @return int
	 */
	public int deleteByIds(List<Long> businessGuidanceTemArr){
		return businessInspectTemMapper.deleteByIds(businessGuidanceTemArr);
	}

   /**
	 * 根据id删除信息 on 2019-11-06 15:56:31
	 * @param id id
	 * @return int
	 */
	public int deleteById(Long id){
		return businessInspectTemMapper.deleteById(id);
	}
}
